package com.ardf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * 选手指卡表
 * </p>
 *
 * @author ShiYunHao
 * @since 2025-01-06
 */
@Getter
@Setter
@Data
public class Card implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 指卡号
     */
    private String number;

    /**
     * 外键：选手id
     */
    private Long athleteId;

    public Card() {
    }

    public Card(Long id, String number, Long athleteId) {
        this.id = id;
        this.number = number;
        this.athleteId = athleteId;
    }

    @Override
    public String toString() {
        return "Card{" +
                "id=" + id +
                ", number='" + number + '\'' +
                ", athleteId=" + athleteId +
                '}';
    }
}
